package com.whfc.fuum.config;

import com.alibaba.nacos.spring.context.annotation.config.NacosPropertySource;
import com.whfc.common.file.FilePathConfig;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @Description:
 * @author: xugcheng
 * @version: 1.0
 * @date: 2019/10/10 10:13
 */
@Configuration
@NacosPropertySource(dataId = "com.whfc.fuum.properties", autoRefreshed = true)
public class FuumConfig {

    @Value("${spring.profiles.active}")
    private String profile;

    @Bean("msFilePathConfig")
    public FilePathConfig msFilePathConfig() {
        FilePathConfig config = new FilePathConfig("ms", profile);
        return config;
    }
}
